﻿// Author: Jin Qing (http://blog.csdn.net/jq0123)

#ifndef SVR_COMMON_SERVER_MAILBOX_H
#define SVR_COMMON_SERVER_MAILBOX_H

#include "mailbox.h"

// Server mail box is used to send messages to other server.
class CServerMailBox : public CMailBox
{
public:
	CServerMailBox(uint16_t uServerId, const std::string & sRemoteAddr,
		uint16_t uRemotePort);

public:
	inline uint16_t GetServerId() const
	{
		return m_uServerId;
	}

	const std::string& GetRemoteAddr() const
	{
		return m_sRemoteAddr;
	}

	uint16_t GetRemotePort() const
	{
		return m_uRemotePort;
	}

private:
	// Server id in cfg.ini. Server id in cmd line.
	const uint16_t    m_uServerId;  
	const std::string m_sRemoteAddr;
	const uint16_t    m_uRemotePort;
};

#endif  // SVR_COMMON_SERVER_MAILBOX_H